home *** CD-ROM | disk | FTP | other *** search
- %!PS-Adobe-3.0 Resource-ProcSet
- %%Title: text2psProlog
- %%Copyright: 1994 Silicon Graphics, Inc. All rights reserved.
- %%BeginResource: procset text2psProcs 1.0 0
- %
- % This prolog contains the procedure and variable definitions for
- % the text2ps filter program.
- %
- /text2psDict 200 dict def
- text2psDict begin
-
- % proc BD
- /BD { bind def } bind def
-
- % x y M
- /M /moveto load def
-
- % string show
- /S /show load def
-
- % font SF
- /SF /setfont load def
-
- % str x y MS
- /MS { M S } BD
-
- % len x y pos thk UL
- /UL {
- gsave
- 0.0 setgray setlinewidth
- newpath
- add M 0 rlineto
- stroke
- grestore
- } BD
-
- % pageWidth RotatePage
- /RotatePage { 90.0 rotate 0.0 exch translate } BD
-
- % xi yi sf xf yf FitPage
- /FitPage { translate dup scale translate } BD
-
- % size fontname F
- /F { findfont exch scalefont } BD
-
- % Reencode the specified font
- % newFontname newEncodingArray existingFontname RE
- /RE {
- findfont dup length dict begin
- {
- 1 index /FID ne
- { def } { pop pop } ifelse
- } forall
- /Encoding exch def
- /FontName 1 index def
- currentdict definefont pop
- end
- } BD
-
- % true if ISOLatin1Encoding vector is defined, false if not
- /HaveISO /ISOLatin1Encoding where { pop true } { false } ifelse def
-
- % width height llx lly Box
- /Box {
- newpath
- M 1 index 0 rlineto 0 exch rlineto neg 0 rlineto
- closepath
- } BD
-
- % width height llx lly BeginCol
- /BeginCol { gsave Box clip } BD
-
- % EndCol
- /EndCol { grestore } BD
-
- % gray width height llx lly BF
- /BF { gsave setgray Box fill grestore } BD
-
- % pageNum x y font PageNumHeader
- /PageNumHeader { gsave SF MS grestore } BD
-
- % pageNum pageNumWidth urx centerStr hspace leftStr llx lly font SimpleHeader
- /SimpleHeader {
- gsave
- newpath
- SF MS 0 rmoveto S currentpoint exch pop M neg 0 rmoveto S
- grestore
- } BD
-
- % topStr topX topY bottomStr bottomX bottomY width height llx lly
- % font GaudyLHeader
- /GaudyLHeader {
- gsave
- SF 0.8 BF MS MS
- grestore
- } BD
-
- % topStr topX topY bottomStr bottomX bottomY width height llx lly
- % font GaudyCHeader
- /GaudyCHeader {
- gsave
- SF 3 -1 roll 2 div 3 1 roll 0.95 BF MS MS
- grestore
- } BD
-
- % pageNum pageNumX pageNumY width height llx lly font GaudyRHeader
- /GaudyRHeader {
- gsave
- SF 0.8 BF MS
- grestore
- } BD
-
- % height llx lly ColSep
- /ColSep {
- gsave
- newpath
- 0 setgray 0.125 setlinewidth
- M 0 exch rlineto
- stroke
- grestore
- } BD
-
- % xf yf sf xi yi FitLines
- /FitLines { translate dup scale translate } BD
-
- % llxt llyt urxt uryt llxtFixed llytFixed urxtFixed urytFixed InitFitPage
- /InitFitPage {
- /urytFixed exch def
- /urxtFixed exch def
- /llytFixed exch def
- /llxtFixed exch def
-
- /uryt exch def
- /urxt exch def
- /llyt exch def
- /llxt exch def
-
- /textXc urxt llxt add 2 div neg def
- /textYc uryt llyt add 2 div neg def
-
- newpath clippath pathbbox
-
- urytFixed 1 eq { pop uryt } { uryt 2 copy ge {exch} if pop } ifelse
- /ury exch def
- urxtFixed 1 eq { pop urxt } { urxt 2 copy ge {exch} if pop } ifelse
- /urx exch def
- llytFixed 1 eq { pop llyt } { llyt 2 copy le {exch} if pop } ifelse
- /lly exch def
- llxtFixed 1 eq { pop llxt } { llxt 2 copy le {exch} if pop } ifelse
- /llx exch def
-
- /pageXc urx llx add 2 div def
- /pageYc ury lly add 2 div def
-
- urx llx sub urxt llxt sub div % X scale factor
- ury lly sub uryt llyt sub div % Y scale factor
- 2 copy ge { exch } if pop % Use min scale factor
- /pageSF exch def
- } BD
-
- % FitPage
- /FitPage {
- pageXc pageYc translate
- pageSF dup scale
- textXc textYc translate
- } BD
-
- end
- %%EndResource
-